<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <base th:href="@{/}"/>
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
</head>
<body>

<b>访问超时，请重新登录，<span id="times">3</span>秒后自动返回</b>
    <script type="text/javascript">
        var time = 3;
        var interval = setInterval(function (){
            --time;
            console.log(time)
            $('#times').html(time)
            if (time==0){
                clearInterval(interval)
                location.href='loginT.html'
            }
        },1000)

    </script>
</body>
</html>